﻿<UserControl x:Class="View.TranslatorSettingsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="615" d:DesignWidth="575">
 <Grid Margin="10">
  <Grid.ColumnDefinitions>
   <ColumnDefinition Width="Auto" />
   <ColumnDefinition Width="6" />
   <ColumnDefinition Width="*" />
  </Grid.ColumnDefinitions>

  <Grid.RowDefinitions>
   <RowDefinition Height="Auto" />
   <RowDefinition Height="10" />
   <RowDefinition Height="Auto" />
   <RowDefinition Height="10" />
   <RowDefinition Height="Auto" />
   <RowDefinition Height="10" />
   <RowDefinition Height="Auto" />
   <RowDefinition Height="10" />
   <RowDefinition Height="Auto" />
   <RowDefinition Height="10" />
   <RowDefinition Height="Auto" />
   <RowDefinition Height="10" />
   <RowDefinition Height="Auto" />
   <RowDefinition Height="10" />
   <RowDefinition Height="Auto" />
   <RowDefinition Height="10" />
   <RowDefinition Height="Auto" />
   <RowDefinition Height="10" />
   <RowDefinition Height="Auto" />
   <RowDefinition Height="10" />
   <RowDefinition Height="Auto" />
   <RowDefinition Height="10" />
   <RowDefinition Height="Auto" />
   <RowDefinition Height="10" />
   <RowDefinition Height="Auto" />
  </Grid.RowDefinitions>

  <Label 
      Grid.Row="0" Grid.Column="0" 
      Content="Translation Service:" 
      HorizontalAlignment="Right"
      Target="{Binding ElementName=cmbTranslationProvider}" 
      />
  <ComboBox
    Grid.Row="0" Grid.Column="2"
    ItemsSource="{Binding TranslationProviders}"
    SelectedValuePath="Key" DisplayMemberPath="Value"
    SelectedItem="{Binding TranslationProvider, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
    x:Name="cmbTranslationProvider" />

  <Label 
      Grid.Row="2" Grid.Column="0" 
      Content="Bing Client ID:" 
      HorizontalAlignment="Right"
      Target="{Binding ElementName=txtBingClientId}" 
      />
  <TextBox 
      x:Name="txtBingClientId"
      Grid.Row="2" Grid.Column="2" 
      Text="{Binding Path=BingClientID}" 
      />

  <Label 
      Grid.Row="4" Grid.Column="0" 
      Content="Bing Client Secret:" 
      HorizontalAlignment="Right"
      Target="{Binding ElementName=txtBingClientSecret}" 
      />
  <TextBox 
      x:Name="txtBingClientSecret"
      Grid.Row="4" Grid.Column="2" 
      Text="{Binding Path=BingClientSecret}" 
      />

  <Label 
      Grid.Row="6" Grid.Column="0" 
      Content="Google Api Key:" 
      HorizontalAlignment="Right"
      Target="{Binding ElementName=txtGoogleApiKey}" 
      />
  <TextBox 
      x:Name="txtGoogleApiKey"
      Grid.Row="6" Grid.Column="2" 
      Text="{Binding Path=GoogleApiKey}" 
      />

  <Label 
      Grid.Row="8" Grid.Column="0" 
      Content="Default Target Locale:" 
      HorizontalAlignment="Right"
      Target="{Binding ElementName=cmbDefaultLocale}" 
      />
  <ComboBox
    Grid.Row="8" Grid.Column="2"
    ItemsSource="{Binding AvailableLocales}"
    DisplayMemberPath="EnglishName"
    SelectedItem="{Binding DefaultTargetLocale}"
    x:Name="cmbDefaultLocale" />

  <Label 
      Grid.Row="10" Grid.Column="0" 
      Content="Owner Name:" 
      HorizontalAlignment="Right"
      Target="{Binding ElementName=txtOwnerName}" 
      />
  <TextBox
      Grid.Row="10" Grid.Column="2" 
      x:Name="txtOwnerName"
    IsEnabled="{Binding OverrideOwner}"
      Text="{Binding OwnerName, UpdateSourceTrigger=PropertyChanged}" />

  <Label 
      Grid.Row="12" Grid.Column="0" 
      Content="Owner Organization:" 
      HorizontalAlignment="Right"
      Target="{Binding ElementName=txtOwnerOrganization}" 
      />
  <TextBox
      Grid.Row="12" Grid.Column="2" 
      x:Name="txtOwnerOrganization"
    IsEnabled="{Binding OverrideOwner}"
      Text="{Binding OwnerOrganization, UpdateSourceTrigger=PropertyChanged}" />

  <Label 
      Grid.Row="14" Grid.Column="0" 
      Content="Owner Url:" 
      HorizontalAlignment="Right"
      Target="{Binding ElementName=txtOwnerUrl}" 
      />
  <TextBox
      Grid.Row="14" Grid.Column="2" 
      x:Name="txtOwnerUrl"
    IsEnabled="{Binding OverrideOwner}"
      Text="{Binding OwnerUrl, UpdateSourceTrigger=PropertyChanged}" />

  <Label 
      Grid.Row="16" Grid.Column="0" 
      Content="Owner Email:" 
      HorizontalAlignment="Right"
      Target="{Binding ElementName=txtOwnerEmail}" 
      />
  <TextBox
      Grid.Row="16" Grid.Column="2" 
      x:Name="txtOwnerEmail"
    IsEnabled="{Binding OverrideOwner}"
      Text="{Binding OwnerEmail, UpdateSourceTrigger=PropertyChanged}" />

  <Label 
      Grid.Row="18" Grid.Column="0" 
      Content="License:" 
      HorizontalAlignment="Right"
      Target="{Binding ElementName=txtLicense}" 
      />
  <TextBox
      Grid.Row="18" Grid.Column="2" 
      x:Name="txtLicense"
   Height="150"
    IsEnabled="{Binding OverrideOwner}"
      Text="{Binding License, UpdateSourceTrigger=PropertyChanged}" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" AutoWordSelection="True" FontFamily="Courier New" FontSize="12" AcceptsReturn="True" AcceptsTab="True" />

  <Label 
      Grid.Row="20" Grid.Column="0" 
      Content="Copyright:" 
   ToolTip="This message will be embedded in resource files generated by this tool when creating language packs"
      HorizontalAlignment="Right"
      Target="{Binding ElementName=txtCopyright}" 
      />
  <TextBox
      Grid.Row="20" Grid.Column="2" 
      x:Name="txtCopyright"
    IsEnabled="{Binding OverrideOwner}"
      Text="{Binding Copyright, UpdateSourceTrigger=PropertyChanged}" />

  <Label 
      Grid.Row="22" Grid.Column="0" 
      Content="Default Dictionary:" 
   ToolTip="The dictionary is a set of translations you keep for later use"
      HorizontalAlignment="Right"
      Target="{Binding ElementName=txtDefaultDictionary}" 
      />
  <Grid
      Grid.Row="22" Grid.Column="2" HorizontalAlignment="Stretch">
   <Grid.ColumnDefinitions>
    <ColumnDefinition Width="*" />
    <ColumnDefinition Width="6" />
    <ColumnDefinition Width="Auto" />
    <ColumnDefinition Width="6" />
    <ColumnDefinition Width="Auto" />
   </Grid.ColumnDefinitions>
   <TextBox x:Name="txtDefaultDictionary"
      Text="{Binding DefaultDictionary, UpdateSourceTrigger=PropertyChanged}" IsEnabled="False" />
   <Button Grid.Row="0" Grid.Column="2" Content="Browse ..." HorizontalAlignment="Stretch"
           Command="{Binding BrowseCommand}"
           />
   <Button Grid.Row="0" Grid.Column="4" Content="New ..." HorizontalAlignment="Stretch"
           Command="{Binding NewCommand}"
           />
  </Grid>
   

 </Grid>
</UserControl>
